package com.keensense.vcm.model;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

/**
 * @author lanjian
 * @date 2020/8/26
 */
@XmlRootElement(name = "response")
public class GetDataDictionaryResponse extends BaseResponse{


    private List<Type> typeList;

    @XmlElementWrapper(name = "typeList")
    @XmlElement(name = "type")
    public List<Type> getTypeList() {
        return typeList;
    }

    public void setTypeList(List<Type> typeList) {
        this.typeList = typeList;
    }

    public static class Type {

        private String typeCode;

        private List<DataDictionary> dataDictionarys;

        @XmlElement
        public String getTypeCode() {
            return typeCode;
        }

        public void setTypeCode(String typeCode) {
            this.typeCode = typeCode;
        }

        @XmlElementWrapper(name = "dataDictionarys")
        @XmlElement(name = "dataDictionary")
        public List<DataDictionary> getDataDictionarys() {
            return dataDictionarys;
        }

        public void setDataDictionarys(List<DataDictionary> dataDictionarys) {
            this.dataDictionarys = dataDictionarys;
        }
    }


    public static class DataDictionary {

        private String id;

        private String name;

        private String value;

        private String typeCode;

        private String description;

        @XmlElement
        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        @XmlElement
        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        @XmlElement
        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }

        @XmlElement
        public String getTypeCode() {
            return typeCode;
        }

        public void setTypeCode(String typeCode) {
            this.typeCode = typeCode;
        }

        @XmlElement
        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }
}
